<!--[if IE 7]>
<link href="<?php echo base_url();?>data/css/ie.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if IE 8]>
<link href="<?php echo base_url();?>data/css/ie.css" rel="stylesheet" type="text/css" /> 
<![endif]-->



		<script type="text/javascript" src="<?php echo base_url();?>data/js/time.js"></script>
    <title>Halaman Administrasi</title>
</head>

<body onload="getTime();">

<div id="container">
  <div id="header">
    <div id="logoHeader"></div>
    <div id="accountName">
    	<div id="accountInfo">
    	  <p><b><span id="date"></span>&nbsp;<span id="clock"></span></b></p>
          <br />
          <p><i>Selamat Datang, <?php echo $nama_akun; ?></i></p>
        </div>
    </div>
  <br class="clearfloat"/>
  </div>
  <!-- end #header -->
  <div id="naviLink">
    <ul id="navUL">
    	<li><a href="<?php echo site_url('main/beranda');?>">Beranda</a></li>
    	<li><a href="<?php echo site_url('main/admin');?>">Admin</a></li>
    	<li><a href="<?php echo site_url('main/penjualan');?>">Penjualan</a></li>
    	<li><a href="<?php echo site_url('main/inventaris');?>">Inventaris</a></li>
        <li><a href="<?php echo site_url('main/pembelian');?>">Pembelian</a></li>
    	<li><a href="<?php echo site_url('main/log');?>">Log</a></li>
    </ul>
    <div id="divLogOut"><a href="<?php echo site_url('main/log_out');?>">Log Out</a></div>
  </div>
    
    <?php
    	// show user messages sent by controller
    	echo output_msg($type = null);
    ?>
  
  <div id="mainContent">
  
  	<div id="contentInfo">

    	<div id="adminInfo">
        	<a href="#">Admin</a>&nbsp;&nbsp;&nbsp;&#8250;&nbsp;&nbsp;&nbsp;<a>Tambah</a>
        </div>
        <br class="clearfloat" />
    </div>
    
  	<br/>
    
    <form method="POST" action="<?php echo site_url('main/'.$action.'Acc');?>">
    
    <div id="adminFormLabel">
        <p style="margin: 0 1px 1px;">Nama Akun: </p>
        <p style="margin: 8px 1px 1px;">Nama Pengguna: </p>
        <p style="margin: 8px 1px 1px;">Password: </p>
        <p style="margin: 8px 1px 1px;">Ulang Password: </p>
        <p style="margin: 8px 1px 1px;">No. Kontak: </p>
        <p style="margin: 8px 1px 1px;">Tipe: </p>
    </div>
    
    <input type="hidden" name="id" value="<?php echo $id;?>" />
    
    <div id="adminFormInput">
        <input type="text" name="namaAkun" value="<?php echo set_value('namaAkun',$values['namaAkun']);?>" />
        <input type="text" name="namaPengguna" value="<?php echo set_value('namaPengguna',$values['namaPengguna']);?>" />
        <input type="password" name="password" />
        <input id="pass2" type="password" name="password2" />
        <input id="kontak" type="text" name="nokontak" value="<?php echo set_value('nokontak',$values['nokontak']);?>" />
        
        <?php $tipe = set_value('tipe',$values['tipe']);
        
        $tipe1 = null;
        $tipe2 = null;
        $tipe3 = "selected='yes'";
        
        switch (strtolower($tipe)){
            case null: break;
            case "admin": $tipe1 = "selected='yes'"; $tipe3 = ""; break;
            case "staff": $tipe2 = "selected='yes'"; $tipe3 = ""; break;
        }
        
        ?>
        
        <select id="type" name="tipe">
            <option disabled="yes" <?php echo $tipe3;?>>::Tipe::</option>
            <option value="admin" <?php echo $tipe1;?>>Admin</option>
            <option value="staff" <?php echo $tipe2;?>>Staff</option>
        </select>
    </div>
    
    <br class="clearfloat"/>
    
    <div id="adminFormSubmit">
        <input id="submit" type="submit" value="<?php echo $buttonVal;?>" name="submit" />
    </div>
    
    <?php
        echo validation_errors();
    ?>
    
    
    </form>
  
    <!-- end #mainContent -->
  </div>